const path = require('path');

//npm install --save-dev html-webpack-plugin
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
	mode: 'development',
	entry: './src/index.js',
	output: {
		filename: 'main.js',
		path: path.resolve(__dirname, 'dist'),
	},
	module: {
		rules: [
			//npm install --save-dev css-loader style-loader raw-loader
			{ test: /\.txt$/, use: 'raw-loader' },
			{ test: /\.css$/, use: ["style-loader", "css-loader"] },
		],
	},
	plugins: [new HtmlWebpackPlugin()],
};